#ifndef __PACKTOEMS_H
#define __PACKTOEMS_H
#include "includes.h"

void Energy_BCU_GJDKHMBBuff(u16 *pbuff);

void FillTestBuff(u16 *Data);
void PackToEMS(void);
void FillKHMBBuff(u16 *Data);
void PackSlefProtect(u8 flag);//void PackSlefProtect(void);
void FillPackToEMSBuff(u16 *Data0400, u16 *Data0401);
void PackToBMSProtect(void);
//void PCS_CurtCtr_Dynamic(u16 *calcurt, u8 faultflag, u16 curtvalue, u8 adjamp_p, u8 adjamp_r, u16 max);
void PCS_CurtCtr_Dynamic(u16 *calcurt, u8 faultflag, u8 adjamp_p, u8 adjamp_r, u16 min, u16 max, u8 faultdelay, u8 nordelay);
//void PackChrgLoadEn(u8 flag, u8* en, u16 chrgamax, u16 loadamax, u8 chrgconfirm, u8 loadconfirm, u8 curtdir);
void PackChrgLoadEnCtr(u8 *en, u8 dischrgcondition, u8 disloadcondition, u8 enchrgcondition, u8 enloadcondition);
void PCS_CurtLimit_Dynamic(u16 *curtlimit, u16 curtnow, u8 faultflag, u16 min, u16 max, u8 faultdelay, u8 nordelay);
u16 PCS_CurtAdj(u16 *curt10plus, u16 minreal, u16 maxreal, u8 adjdir);
#endif
